feat(java): add Google Tink detection rules (AEAD, Mac, Hybrid, Signature)#407
Conversation
…imitives Signed-off-by: Chennamma <channuhotkar@gmail.com>
9d63d21 to
9581052
Compare
|
Hey @Chennamma-Hotkar , After going through the changes carefully, I have to be honest: this PR has some fundamental issues that prevent us from merging it, and they follow a pattern we've seen in your previous PRs. It looks like a lot of this was generated or assembled without a thorough understanding of how the detection engine actually works. I'd like to explain why, concretely, so you can fix it properly if you want to take another shot at this. The detection rules don't actually distinguish templates and every rule across all four primitives is functionally identical:
The tests actually confirm this unintentionally The test assertions don't test anything meaningful All four test classes share essentially the same asserts() body, and every one accepts any of all 16 possible values:
We'd genuinely welcome proper Tink support, but if you want to take this on, please do it comprehensively:
Happy to discuss the right approach here before you invest more time, just drop a comment. |
Summary
Adds detection rules for Google Tink Java cryptography library covering all four major primitives: AEAD, MAC, hybrid encryption, and digital signatures. Tink is one of the most widely used Java cryptography libraries and previously had no detection coverage in this plugin.
This PR replaces #406 — that PR's AEAD work is included here in a single self-contained commit.
Architecture
Each primitive follows the same pattern:
KeysetHandle.generateNew(template)is the primary detection pointencrypt/decrypt,computeMac/verifyMac,sign/verify) are attached as depending rulesCipherContextMacContextSignatureContextDetection Coverage
Testing
mvn spotless:checkpassesmvn -B clean package -pl javapassesFollow-up (separate PR)
DeterministicAeadoperationsChaCha20Poly1305,AES_SIV,AES_EAX)KeysetHandle.newBuilder()pattern detection